Using a Slider

A slider always has one hundred possible values along its length, regardless of its size on the screen. That is, if the value range is 0 to 100, all values selectable by the user will be integers. Tick marks are for display only; they do not represent a defined set of locations to which the slider can move. To read or set the current value of the slider using script, use the Value property.

When you use a script to specify a value, the property is shown in blue on the Property Sheet.

In specifying the MaximumEq and MinimumEq properties, you have the option of setting a dynamic value (rather than a constant), using the chooser next to each property in the property sheet. If you use a script, store the calculated value in the Retn variable. For example, to set the slider’s upper limit to the value in a text box, txtValue, use the following script in the mini editor.

Copy
Slider
Function Slider1_MaximumEq()
Dim This : Set This = Slider1
 
Retn = CLng(txtValue.Text)
 
Slider1_MaximumEq = Retn
End Function

When you use a script to specify a value, the property is shown in blue in the property sheet.

See Configuring a Context Menu for another example of using a Slider tool.